@import './variables.scss';

.ui-icon-warning {
  color: $color-primary;
  margin-right: 5px;
}

.ui-button--text {
  border: transparent !important;
  background-color: transparent !important;
  @include menuText;
}

/* 文件上传 start */
.upload-main {
  .ui-upload-dragger {
    background: #fafafa;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    width: 300px;
    height: 130px;
    line-height: 24px;

    img {
      width: 34px;
      height: auto;
      margin-top: 15px;
    }

    .support {
      font-size: $s12;
      margin-top: 5px;
    }

    .center {
      margin-top: 10px;
      font-size: $s14;
    }
  }
}

/* 文件上传 end */

/* ui-table表格样式 start */
.ui-table {
  tr {
    background: $color-bg-default;
  }

  thead {
    th {
      height: 48px;
      background: #f7f7f7;

      .cell {
        font-size: $s14;
        font-family: PingFangSC, PingFangSC-Medium, sans-serif;
        font-weight: $font-weight-semibold;
        color: $color-text-secondary;
      }
    }

    th.is-leaf {
      background: #f7f9fb;
    }
  }

  tbody {
    .hover-row {
      background: #f2f7ff;
    }

    .ui-table__row {

      // 表内容高度由表内容自动撑开
      td {
        height: 48px;
        padding: 0;
      }

      .cell {
        font-size: $s14;
        font-family: PingFangSC, PingFangSC-Regular, sans-serif;
        font-weight: $font-weight-normal;
        color: #606266;
      }
    }
  }

  // 修复ui-table fixed列高度错位问题
  .ui-table__fixed-right,
  .ui-table__fixed {
    height: 100% !important;
  }
}

.ui-table--striped .ui-table__body tr.ui-table__row--striped td {
  background: #f5f5f5;
}

/* ui-table表格样式 end */

/* 单、多选框公共样式 start */
.ui-checkbox,
.ui-radio {
  font-weight: 400;
}

.ui-checkbox__inner,
.ui-radio__inner {
  width: 14px;
  height: 14px;
  border: solid 1px $color-border-1 !important;
}

/*单、多选框公共样式 end */

/* 多选框样式 start */
.ui-checkbox__label {
  font-size: $s14;
  color: $color-text-secondary;
  padding-left: 6px;
}

.ui-checkbox__input.is-checked .ui-checkbox__inner {
  background-color: $color-primary;
  border-color: $color-primary;
}

.ui-checkbox__input.is-checked+.ui-checkbox__label {
  color: $color-text-secondary;
}

.ui-checkbox__input.is-indeterminate .ui-checkbox__inner {
  background-color: $color-primary;
  border-color: $color-primary;
}

.ui-checkbox__input.is-indeterminate .ui-checkbox__inner::before {
  color: #fff;
  content: '';
  position: absolute;
  display: block;
  background-color: $color-bg-default;
  height: 2px;
  -webkit-transform: scale(0.5);
  transform: scale(0.5);
  left: 0;
  right: 0;
  top: 6.4px;
}

.ui-checkbox {
  .ui-checkbox__input.is-checked {
    .ui-checkbox__inner {
      background-color: $color-primary;
      border-color: $color-primary;

      &::after {
        box-sizing: content-box;
        content: '';
        border-width: 0 1px 1px 0;
        border-color: #fff;
        border-style: solid;
        height: 7px;
        left: 5px;
        position: absolute;
        top: 1.5px;
      }
    }
  }
}

/* 多选框勾选 end */

/* 单选框 start */
.ui-radio__input.is-checked .ui-radio__inner {
  background-color: $color-primary !important;
  border-color: $color-primary !important;
}

// 单选框 end

/* 两个单选按钮组 start,宽150px,高40px */
.two-radio-group {
  .ui-radio-button {
    position: relative;
    margin-right: -1px;
  }

  .ui-radio-button__inner {
    width: 120px;
    height: 40px;
    line-height: 40px;
    padding: 0;
    background-color: $color-bg-default;
    color: $color-text-primary;
    border: 1px solid $color-border-1;
  }

  .is-active {
    z-index: 2;

    .ui-radio-button__orig-radio:checked+.ui-radio-button__inner {
      color: $color-primary;
      background-color: $color-bg-default;
      border-color: $color-primary;
      box-shadow: none;
    }
  }
}

/* 两个单选按钮组 end */

/* 三个单选按钮组 start,宽100px,高40px */
.three-radio-group {
  .ui-radio-button {
    position: relative;
    margin-right: -1px;
  }

  .ui-radio-button__inner {
    width: 100px;
    height: 40px;
    line-height: 40px;
    padding: 0;
    background-color: $color-bg-default;
    color: $color-text-primary;
    border: 1px solid $color-border-1;
  }

  .is-active {
    z-index: 2;

    .ui-radio-button__orig-radio:checked+.ui-radio-button__inner {
      color: $color-primary;
      background-color: $color-bg-default;
      border-color: $color-primary;
      box-shadow: none;
    }

    /* 原生table需要居中的元素统一用的class */
    .detail-info-table {
      width: 100%;
      border-collapse: collapse;

      th {
        background: #f7f7f7;
      }

      th,
      td {
        font-size: $s14;
        font-weight: $font-weight-medium;
        text-align: left;
        color: $color-text-primary;
        line-height: 18px;
        padding: 0 14px;
        height: 48px;
        border: 1px solid $color-border-3;
        word-break: break-all;
      }

      /* 表格中的标题部分 */
      .detail-info-table-title {
        background: #f7f9fb;
        background-clip: padding-box;
        text-align: center;
        color: $color-text-secondary;
        font-weight: $font-weight-normal;
      }
    }
  }
}

/* 三个单选按钮组 end */

/* 五个单选按钮组 start,宽76px,高40px */
.five-radio-group {
  .ui-radio-button {
    position: relative;
    margin-right: -1px;
  }

  .ui-radio-button__inner {
    width: 76px;
    height: 40px;
    line-height: 40px;
    padding: 0;
    background-color: $color-bg-default;
    color: $color-text-primary;
    border: 1px solid $color-border-1;
  }

  .is-active {
    z-index: 2;

    .ui-radio-button__orig-radio:checked+.ui-radio-button__inner {
      color: $color-primary;
      background-color: $color-bg-default;
      border-color: $color-primary;
      box-shadow: none;
    }
  }
}

/* 五个单选按钮组 end */

/* 下拉选择框 start */
.ui-select {
  .ui-input__inner {
    vertical-align: top;
  }
}

// 下拉列表样式
.ui-select-dropdown__item.selected {
  color: $color-text-hover;
  background-color: $color-bg;
  font-weight: $font-weight-normal;
}

/* 下拉选择框 end */

/* ui-dialog对话框弹窗样式 start */
.ui-dialog {
  background-color: #fff;
  border-radius: 8px;

  .formlist {
    .ui-form-item {
      margin-bottom: 0;
    }

    .result {

      .back,
      .more {
        background: #fff;
      }
    }
  }

  .ui-select {
    width: 100%;
  }

  .ui-container-full__header {
    text-align: left;
  }

  .ui-dialog__header {
    margin: 0 auto;
    padding-top: 40px;

    .ui-dialog__title {
      font-size: $s20;
      font-family: SourceHanSansCN, SourceHanSansCN-Medium, sans-serif;
      font-weight: $font-weight-medium;
      color: $color-text-primary;
      line-height: 30px;
      letter-spacing: 0;
      padding-bottom: 40px;
      display: contents;
      text-align: center;
    }
  }

  .ui-dialog__body {
    padding: 0 40px 40px;
  }

  .ui-dialog__footer {
    text-align: center;
    padding-bottom: 40px;
    padding-top: 0;
  }
}

.ui-dialog--center {
  .ui-dialog__body {
    padding: 0 25px 30px;
  }

  .ui-dialog__header {
    padding: 12px 20px 10px;
  }
}

/* ui-dialog对话框弹窗样式 end */

/* MessageBox弹窗样式 start */
.ui-message-box {
  min-width: 507px;

  h2 {
    text-align: center;
    font-size: 32px;
  }

  .ui-button--default {
    background: $color-bg-default;
    border-radius: 6px;
    border-color: $color-border-6;
    color: $color-text-regular;
    min-width: 120px;
    height: 40px;
    padding: 0;

    span,
    a {
      font-size: $s16;
      font-weight: $font-weight-normal;
      text-align: center;
      line-height: 16px;
    }

    &:hover {
      background: $color-bg-default;
      border: 1px solid $color-border-7;
    }

    &:focus {
      border: 1px solid $color-border-8;
    }

    &:disabled {
      background: $color-bg-default;
      opacity: 0.5;
      border: 1px solid $color-border-6 !important;
    }
  }

  .ui-button--primary {
    // background: $color-bg-gradient;
    @include menuBg;
    border-radius: 4px;
    min-width: 120px;
    height: 40px;
    padding: 0;

    span,
    a {
      font-size: $s16;
      font-weight: $font-weight-normal;
      text-align: center;
      color: $color-text-fill;
      line-height: 16px;
    }

    &:hover {
      background: $color-bg-btn-primary-hover !important;
    }
  }
}

/* MessageBox弹窗样式 end */

/* ui-container-full start */
.ui-container-full {
  .ui-container-full__body {
    border-radius: 8px;
    min-height: 630px;
    padding: 20px;
    box-sizing: border-box;
  }

  position: relative;
}

/* ui-container-full end */

/* input输入框 start */
.ui-input-group--prepend {
  .ui-input-group__prepend {
    background-color: $color-bg-default;
    border: 1px solid $color-border-1;
  }
}

// ui-input 后缀样式
.ui-input__inner:focus {
  border: 1px solid $color-primary;
}

// ui-input icon图标
.ui-input__icon {
  color: $color-primary;
  font-size: $s20;
}

/* input输入框 end */

/* 信息录入页的日期选择框样式 start */
.ui-date-editor--date {
  .ui-input__inner {
    padding-left: 15px;
  }

  .ui-input__prefix {
    top: 3px;
    left: 270px;
  }

  .ui-input__suffix {
    top: 3px;
    right: -50px;
  }
}

/* 信息录入页的日期选择框样式 end */

/* 信息录入页的日期选择框样式(精确到分钟) start */
.ui-date-editor--datetime {
  .ui-input__inner {
    padding-left: 35px;
  }

  .ui-input__prefix {
    top: 3px;
  }

  .ui-input__suffix {
    top: 3px;
    right: -50px;
  }
}

/* 信息录入页的日期选择框样式(精确到分钟) end */

/* 日期范围选择 start */
.ui-date-range-picker {
  .ui-picker-panel__shortcut {
    margin: 0;
    text-align: center;
  }
}

/* 日期范围选择 end */

/* 日期控件下拉选择弹出框样式 start */
.ui-date-table td span {
  -webkit-transform: translateX(0);
  transform: translateX(0);
  margin-left: -12px;
}

.ui-date-table td.available:hover,
.ui-date-table td.today span {
  color: $color-primary;
}

/* 日期控件下拉选择弹出框样式 end */

/* 分页样式 start */
.ui-pagination {
  font-weight: $font-weight-normal;
  text-align: right;
  margin-top: 10px;
  margin-bottom: 30px;

  .ui-pager li {
    padding: 0 4px;
    background: $color-bg-default;
    vertical-align: top;
    display: inline-block;
    font-size: 13px;
    min-width: 35.5px;
    height: 28px;
    line-height: 28px;
    cursor: pointer;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    text-align: center;
    margin: 0;
    color: #606266;
  }

  .ui-pager li.active {
    color: $color-primary;
  }
}

/* 分页样式 end */

/* 折叠面板 start */
.ui-collapse-item {
  i.ui-collapse-item__arrow {
    border: 1px solid #b5bad0;
    border-radius: 50%;
    text-align: center;
    width: 20px;
    height: 20px;
    line-height: 20px;
  }

  .ui-collapse-item__header {
    background: $color-bg;
    border-radius: 4px;
    font-size: $s16;
    font-family: PingFangSC, PingFangSC-Medium, sans-serif;
    font-weight: $font-weight-medium;
    text-align: left;
    color: $color-text-primary;
    line-height: 22px;
    padding-left: 20px;
  }

  .ui-collapse-item__wrap {
    border: 1px solid $color-border-3;
  }
}

/* 折叠面板 end */

/* ui-button 字号 */
.ui-button {
  font-size: 14px;
  font-weight: 400;
}

/* 主题色实心按钮 start */
.primary-btn {
  @include menuBg;
  border-radius: 6px;
  min-width: 120px;
  height: 40px;
  padding: 0;

  span,
  a {
    font-size: $s14;
    font-weight: $font-weight-normal;
    text-align: center;
    color: $color-text-fill;
    line-height: 16px;
  }

  &:hover {
    background: $color-bg-btn-primary-hover;
  }

  &:focus {
    background: $color-bg-btn-primary-active;
  }

  &:disabled {
    opacity: 0.5;
    background: $color-bg-btn-primary-disabled !important;
  }
}

/* 主题色实心按钮 end */

/* 主题色实心按钮 - 长 start */
.primary-long-btn {
  // background: $color-bg-gradient;
  @include menuBg;
  border-radius: 6px;
  min-width: 120px;
  height: 40px;
  padding: 0;

  span,
  a {
    font-size: $s14;
    font-weight: $font-weight-normal;
    text-align: center;
    color: $color-text-fill;
    line-height: 16px;
  }

  &:hover {
    background: $color-bg-btn-primary-hover;
  }

  &:focus {
    background: $color-bg-btn-primary-active;
  }

  &:disabled {
    opacity: 0.5;
    background: $color-bg-btn-primary-disabled !important;
  }
}

/* 主题色实心按钮 - 长 end */

/* 白色空心按钮 start */
.default-btn {
  background: $color-bg-default;
  border-radius: 6px;
  border-color: $color-border-6;
  color: $color-text-regular;
  min-width: 120px;
  height: 40px;
  padding: 0;

  span,
  a {
    font-size: $s14;
    font-weight: $font-weight-normal;
    text-align: center;
    line-height: 16px;
  }

  &:hover {
    background: $color-bg-default;
    border: 1px solid $color-border-7;
  }

  &:focus {
    background: $color-bg-default;
    border: 1px solid $color-border-8;
  }

  &:disabled {
    background: $color-bg-default;
    opacity: 0.5;
    border: 1px solid $color-border-6 !important;
  }
}

/* 白色空心按钮 end */

/* 白色空心按钮 - 长 start */
.default-long-btn {
  background: $color-bg-default;
  border-radius: 6px;
  border-color: $color-border-6;
  min-width: 120px;
  height: 40px;
  padding: 0;

  span,
  a {
    font-size: $s14;
    font-weight: $font-weight-normal;
    text-align: center;
    color: $color-text-primary;
    line-height: 16px;
  }

  &:hover {
    background: $color-bg-default;
    border: 1px solid $color-border-7;
  }

  &:focus {
    background: $color-bg-default;
    border: 1px solid $color-border-8;
  }

  &:disabled {
    background: $color-bg-default;
    opacity: 0.5;
    border: 1px solid $color-border-6 !important;
  }
}

/* 白色空心按钮 - 长 end */

/* 主题色空心按钮 start */
.info-btn {
  background: $color-bg-default;
  border-radius: 6px;
  border-color: $color-border-7;
  min-width: 120px;
  height: 40px;
  padding: 0;

  span,
  a {
    font-size: $s14;
    font-weight: $font-weight-normal;
    text-align: center;
    color: $color-text-hover;
    line-height: 16px;
  }

  &:hover {
    background-color: $color-bg-btn-info-hover;
    border-color: $color-border-7;
  }

  &:focus {
    border: 1px solid $color-border-8;
    background-color: $color-bg-btn-info-active;
  }

  &:disabled {
    opacity: 0.5;
    background-color: $color-bg-btn-info-active !important;
  }
}

/* 主题色空心按钮 end */

/* 主题色空心按钮 - 长 start */
.info-long-btn {
  background: $color-bg-default;
  border-radius: 6px;
  border-color: $color-border-7;
  min-width: 120px;
  height: 40px;
  padding: 0;

  span,
  a {
    font-size: $s14;
    font-weight: $font-weight-normal;
    text-align: center;
    color: $color-text-hover;
    line-height: 16px;
  }

  &:hover {
    background-color: $color-bg-btn-info-hover;
    border-color: $color-border-7;
  }

  &:focus {
    border: 1px solid $color-border-8;
    background-color: $color-bg-btn-info-active;
  }

  &:disabled {
    opacity: 0.5;
    background-color: $color-bg-btn-info-active !important;
  }
}

/* 主题色空心按钮 - 长 end */

/* button禁用样式 start */
.ui-button.is-disabled:hover {
  background: auto;
}

/* button禁用样式 end */

/* 标题tabs切换 start */
.ui-tabs {
  .ui-tabs__header {
    margin-bottom: 29px;
  }
}

/* 标题tabs切换 end */

/* 资金归集首页tab切换 start */
.funds-tabs {
  .ui-tabs--card {
    .ui-tabs__header {
      border: none;
      margin-bottom: 0;

      .ui-tabs__nav,
      .ui-tabs__item {
        padding: 0;
        border: none;
        font-family: Source Han Sans CN, sans-serif;
        color: $color-text-secondary;
        font-size: $s18;
        line-height: $s18;
        text-align: center;

        &.is-active {
          font-weight: bold;
          color: $color-text-primary;
        }

        &.is-active:after {
          content: '';
        }
      }

      .ui-tabs__item {
        padding-left: 30px !important;
      }

      .ui-tabs__item:nth-child(1) {
        padding-left: 0 !important;
      }

      .ui-tabs__item:after {
        display: block;
        margin: 10px auto 0;
        width: 72px;
        height: 4px;
        background-color: $color-primary;
        border-radius: 2px;
      }
    }
  }
}

/* 资金归集首页tab切换 end */

/* switch开关组件 start */
.ui-switch {
  display: inline-block;
  line-height: 1;

  .ui-switch__label {
    position: absolute;
    opacity: 0;
    transition: opacity 0.3s;
    color: #fff;
    line-height: 18px;
  }

  .ui-switch__label.is-active {
    z-index: 2;
    opacity: 1;
  }

  .ui-switch__label--left {
    right: 0;
    margin-right: 5px;
  }

  .ui-switch__label--right {
    left: 0;
    margin-left: 5px;
  }
}

/* switch开关组件 end */

/* ui-dropdown start */
.ui-dropdown {
  vertical-align: middle;

  .ui-dropdown-link {
    font-size: $s16;
  }
}

.more-item {
  padding: 0;

  .ui-dropdown-menu__item {
    padding: 0;

    .ui-link {
      padding: 0 20px;
      display: block;
    }
  }

  .ui-dropdown-menu__item:focus,
  .ui-dropdown-menu__item:hover,
  .ui-dropdown-menu__item:not(.is-disabled):hover {
    background: rgba(49, 100, 232, 0.1);
  }

  .ui-link--default {
    color: $color-text-sub;
  }

  .ui-link.ui-link--default:hover {
    color: $color-text-sub;
  }

  .blue.ui-link {
    color: $color-text-sub;
  }

  .ui-link--danger:hover {
    color: $color-danger;
  }
}

/* ui-dropdown end */
